{% extends "bvblogapp/base.html" %}


{% block pageName %}BioVenturist - Blog Index{% endblock %}
{% block extra_links %}
<link rel="alternate" 
      type="application/rss+xml" 
      title="RSS" 
      href="/analysis/feeds/user/{{ username }}/" />
{% endblock %}


{% block queryScript %}


<!--script type="text/javascript" src="/static/js/webtoolkit.scrollabletable.js"></script-->
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<!--script type="text/javascript" src="/static/js/webtoolkit.jscrollable.js"></script-->

<!-- begin: Facebox jQuery Plugin-->
<link href="/bvsearchapp/static/js/facebox.css" media="screen" rel="stylesheet" type="text/css"/>
<script src="/bvsearchapp/static/js/facebox.js" type="text/javascript"></script>
<!-- end: Facebox jQuery Plugin-->

<!-- begin: Yahoo UI Datatable -->
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/combo?2.8.0r4/build/paginator/assets/skins/sam/paginator.css&2.8.0r4/build/datatable/assets/skins/sam/datatable.css">
<script type="text/javascript" src="http://yui.yahooapis.com/combo?2.8.0r4/build/yahoo-dom-event/yahoo-dom-event.js&2.8.0r4/build/datasource/datasource-min.js&2.8.0r4/build/element/element-min.js&2.8.0r4/build/paginator/paginator-min.js&2.8.0r4/build/datatable/datatable-min.js"></script>
<!-- end: Yahoo UI Datatable -->

<script type="text/javascript" src="/bvblogapp/static/js/transform_table.js"></script>
<link type="text/css" rel="stylesheet" href="/bvblogapp/static/css/bvblogapp.css"></link>

{% endblock %}

{% block container %}
<div id="col2">
    <table class="width100">
        <tr>
            <td class="blog_index">
			    <table class="width100">
			    	<tr>
			    		<td style="padding: 0; margin: 0">
							<h1>Analyses</h1>
						</td>
						<td style="padding: 0; margin: 0" align="right">
							<a href="/analysis/feeds/user/{{ username }}/"><img src="/static/img/rss.png" /></a>
						</td>
					</tr>
				</table>            	
				
                
				{% if paginator.object_list %}
                {% for post in paginator.object_list %}
                <p class="post_date">
                    {{ post.created_at|date:"D, d M Y" }}
                </p>
                <h2 class="blog_post_title"><a href="{{ post.get_absolute_url }}">{{ post.title }}</a></h2>
                <div class="post_body">
                    {{ post.text|safe }} 
                </div>                
                <p class="post_tags">
                    <span class="blog_post_tags_title">Tags: </span>{{ post.tags_urls|safe }}
                </p>
                <p class="post_comments">
                    <span class="blog_post_comments_title">Comments: </span>
                    {{ post.comments_count }}
                </p>
                <hr/> {% endfor %}
				{% block pagination %}
                <div id="pagination">
                    {% if paginator.has_prev_page %}<a href="{% url blog_index username %}?page={{paginator.prev_page}}">&lt;</a>{% endif %}
                    {% for page in paginator.page_range %}
                    {% ifequal paginator.page page %} <span class="strong">{{ page }}</span>&nbsp;
                    {% else %}<a href="{% url blog_index username %}?page={{page}}">{{ page }}</a>&nbsp;
                    {% endifequal %}
                    {% endfor %}
                    {% if paginator.has_next_page %}<a href="{% url blog_index username %}?page={{paginator.next_page}}">&gt;</a>{% endif %} 
                </div>
				{% endblock %}
            </td>
            <td class="tags">
				{% include 'bvblogapp/tags.html' %}
            </td>
			{% else %}
			<p>Sorry, user {{ user.username }} hasn't public analyses.</p>
			{% endif %}
        </tr>
    </table>
</div>
{% endblock %}
